var express = require('express');
var router = new express.Router();
var Mock = require('mockjs')


var partners=[];
var list = Mock.mock({
  'list|5': [{
    'name|1':['申通快递', '圆通快递','中通快递','韵达快递','顺丰快递','邮政快递'],
    'phone': /\d{6,10}/,
    address:'@county(true)',
    date:'@now',
    limit:/\d{1,2}/
  }]
})

partners=list.list;

router.get('/list', function (req, res) {

  res.send(list.list);
})


router.get('/add',function (request,response) {
  console.log(request.query);
  users.unshift(request.query)//把数据添加到数组的最上方
  response.send({
    emps:partners,
    flag: true
  })
})



module.exports= router;
